package com.kingzoder.food.common.base.page;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 轩辕铮
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "通用分页查询")
public class PageQuery extends BaseQuery {

    @SchemaProperty(name = "每页数量， 默认10")
    private Integer pageSize = 10;

    @SchemaProperty(name = "页码，默认1")
    private Integer pageNum = 1;

    @SchemaProperty(name = "开始时间")
    @JsonFormat(pattern = "YYYY-MM-DD")
    private String beginTime;

    @SchemaProperty(name = "结束时间")
    @JsonFormat(pattern = "YYYY-MM-DD")
    private String endTime;
}
